GtkTimeline: introspection fixes, add :progress-type property
authorOwen W. Taylor <otaylor@fishsoup.net>
Thu, 27 Sep 2012 21:05:22 +0000 (17:05 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Thu, 14 Feb 2013 22:19:49 +0000 (17:19 -0500)
Fix up introspection information for GtkTimeline, install the
header has a public heaer, and add the property for :progress-type.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

gtk/Makefile.am
gtk/gtktimeline.c

index 70ef2049ef3357ea816e7e9d54c52dba6b18be1a..bc1dc7ccbafd3762fc51437dbba9055fdfac7d72 100644 (file)
@@ -348,6 +348,7 @@ gtk_public_h_sources =              \
        gtktexttagtable.h       \
        gtktextview.h           \
        gtkthemingengine.h      \
+       gtktimeline.h           \
        gtktoggleaction.h       \
        gtktogglebutton.h       \
        gtktoggletoolbutton.h   \
@@ -544,7 +545,6 @@ gtk_private_h_sources =             \
        gtktextutil.h           \
        gtkthemingbackgroundprivate.h \
        gtkthemingengineprivate.h \
-       gtktimeline.h           \
        gtktoolpaletteprivate.h \
        gtktreedatalist.h       \
        gtktreeprivate.h        \
index 5acbf7c243aa8226b3f05e61f3161438ac940bed..55df628be0c5f87e9f384bdd21533cafc3eebf3a 100644 (file)
@@ -52,6 +52,7 @@ enum {
   PROP_LOOP,
   PROP_DIRECTION,
   PROP_FRAME_CLOCK,
+  PROP_PROGRESS_TYPE,
   PROP_SCREEN,
   PROP_WIDGET
 };
@@ -119,6 +120,14 @@ gtk_timeline_class_init (GtkTimelineClass *klass)
                                                         "clock used for timing the animation (not needed if :widget is set)",
                                                         GDK_TYPE_FRAME_CLOCK,
                                                         G_PARAM_READWRITE));
+  g_object_class_install_property (object_class,
+                                   PROP_PROGRESS_TYPE,
+                                   g_param_spec_enum ("progress-type",
+                                                      "Progress Type",
+                                                      "Easing function for animation progress",
+                                                      GTK_TYPE_TIMELINE_PROGRESS_TYPE,
+                                                      GTK_TIMELINE_PROGRESS_EASE_OUT,
+                                                      G_PARAM_READWRITE));
   g_object_class_install_property (object_class,
                                    PROP_SCREEN,
                                    g_param_spec_object ("screen",
@@ -222,6 +231,10 @@ gtk_timeline_set_property (GObject      *object,
       gtk_timeline_set_frame_clock (timeline,
                                     GDK_FRAME_CLOCK (g_value_get_object (value)));
       break;
+    case PROP_PROGRESS_TYPE:
+      gtk_timeline_set_progress_type (timeline,
+                                      g_value_get_enum (value));
+      break;
     case PROP_SCREEN:
       gtk_timeline_set_screen (timeline,
                                GDK_SCREEN (g_value_get_object (value)));
@@ -261,6 +274,9 @@ gtk_timeline_get_property (GObject    *object,
     case PROP_FRAME_CLOCK:
       g_value_set_object (value, priv->frame_clock);
       break;
+    case PROP_PROGRESS_TYPE:
+      g_value_set_enum (value, priv->progress_type);
+      break;
     case PROP_SCREEN:
       g_value_set_object (value, priv->screen);
       break;
@@ -454,7 +470,7 @@ gtk_timeline_stop_running (GtkTimeline *timeline)
     gtk_timeline_stop_updating (timeline);
 }
 
-/*
+/**
  * gtk_timeline_new:
  * @widget: a widget the timeline will be used with
  * @duration: duration in milliseconds for the timeline
@@ -473,7 +489,7 @@ gtk_timeline_new (GtkWidget *widget,
                        NULL);
 }
 
-/*
+/**
  * gtk_timeline_start:
  * @timeline: A #GtkTimeline
  *
@@ -507,7 +523,7 @@ gtk_timeline_start (GtkTimeline *timeline)
     }
 }
 
-/*
+/**
  * gtk_timeline_pause:
  * @timeline: A #GtkTimeline
  *
@@ -531,7 +547,7 @@ gtk_timeline_pause (GtkTimeline *timeline)
     }
 }
 
-/*
+/**
  * gtk_timeline_rewind:
  * @timeline: A #GtkTimeline
  *
@@ -555,7 +571,7 @@ gtk_timeline_rewind (GtkTimeline *timeline)
     priv->last_time = gdk_frame_clock_get_frame_time (priv->frame_clock);
 }
 
-/*
+/**
  * gtk_timeline_is_running:
  * @timeline: A #GtkTimeline
  *
@@ -575,7 +591,7 @@ gtk_timeline_is_running (GtkTimeline *timeline)
   return priv->running;
 }
 
-/*
+/**
  * gtk_timeline_get_elapsed_time:
  * @timeline: A #GtkTimeline
  *
@@ -614,7 +630,7 @@ gtk_timeline_get_loop (GtkTimeline *timeline)
   return priv->loop;
 }
 
-/*
+/**
  * gtk_timeline_set_loop:
  * @timeline: A #GtkTimeline
  * @loop: %TRUE to make the timeline loop
@@ -668,7 +684,7 @@ gtk_timeline_get_duration (GtkTimeline *timeline)
   return priv->duration;
 }
 
-/*
+/**
  * gtk_timeline_set_direction:
  * @timeline: A #GtkTimeline
  * @direction: direction
@@ -737,6 +753,11 @@ gtk_timeline_set_frame_clock (GtkTimeline   *timeline,
   g_object_notify (G_OBJECT (timeline), "paint-clock");
 }
 
+/**
+ * gtk_timeline_get_frame_clock:
+ *
+ * Returns: (transfer none): 
+ */
 GdkFrameClock *
 gtk_timeline_get_frame_clock (GtkTimeline *timeline)
 {
@@ -773,6 +794,11 @@ gtk_timeline_set_screen (GtkTimeline *timeline,
   g_object_notify (G_OBJECT (timeline), "screen");
 }
 
+/**
+ * gtk_timeline_get_screen:
+ *
+ * Returns: (transfer none): 
+ */
 GdkScreen *
 gtk_timeline_get_screen (GtkTimeline *timeline)
 {
@@ -814,6 +840,11 @@ gtk_timeline_set_widget (GtkTimeline *timeline,
   g_object_notify (G_OBJECT (timeline), "widget");
 }
 
+/**
+ * gtk_timeline_get_widget:
+ *
+ * Returns: (transfer none): 
+ */
 GtkWidget *
 gtk_timeline_get_widget (GtkTimeline *timeline)
 {